import { request } from "@/utils/request";
let authInfo = {
  username: 'wcadmin',
  password: 'wcadmin'
}

export function getFolderContents(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/pdm/folder/getFolderContents',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}

/**流程人 */
export function getWFSelectPrincipal(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/foundation/workflow/getPageSelectPrincipal',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}

/**提交流程 */
export function startDocWfProcess(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/foundation/workflow/startDocWfProcess',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}

/**基本信息 */
export function getAttributeGroup(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/pdm/attribute/getAttributeGroup',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}

/**流程信息 */
export function getProcessSteps(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/foundation/workflow/getProcessSteps',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}

/**获取流程记录 */
export function getDisposeStatus(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/foundation/workflow/getDisposeStatus',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}

/**radio记录 */
export function getRouting(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/foundation/workflow/getRouting',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}

/**处理流程 */
export function completeWorkItem(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/foundation/workflow/completeWorkItem',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}

/**转办 */
export function reassignWorkItem(parameter) {
  return request({
    url: '/plm/Windchill/servlet/rest/hzero/foundation/workflow/reassignWorkItem',
    method: 'post',
    data: parameter,
    auth: authInfo
  })
}


